package boot2.async;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/asyncTest")
public class AsyncController {

    @Autowired
    AsyncService asyncService;

    @GetMapping("/page")
    public String getPage(){
        System.out.println( "Thread m- "+  Thread.currentThread().getName());
        asyncService.genecExp();
        return "async";
    }




    public static void main(String[] args) {

    }
}
